home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / dev / mui / MCC_HTMLtext.lha / MCC_HTMLtext / Developer / AutoDocs / HTMLtext_mcc.doc next >
Encoding:
Text File  |  1997-04-21  |  10.5 KB  |  357 lines

  1. TABLE OF CONTENTS
  2.  
  3. HTMLtext.mcc/HTMLtext.mcc
  4. HTMLtext.mcc/MUIA_HTMLtext_Block
  5. HTMLtext.mcc/MUIA_HTMLtext_CloseURLHook
  6. HTMLtext.mcc/MUIA_HTMLtext_Contents
  7. HTMLtext.mcc/MUIA_HTMLtext_DoubleClick
  8. HTMLtext.mcc/MUIA_HTMLtext_ElementList
  9. HTMLtext.mcc/MUIA_HTMLtext_LoadImages
  10. HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook
  11. HTMLtext.mcc/MUIA_HTMLtext_Path
  12. HTMLtext.mcc/MUIA_HTMLtext_Title
  13. HTMLtext.mcc/MUIA_HTMLtext_URL
  14. HTMLtext.mcc/MUIM_HTMLtext_Jump
  15. HTMLtext.mcc/MUIM_HTMLtext_Mark
  16. HTMLtext.mcc/MUIM_HTMLtext_Reload
  17. HTMLtext.mcc/HTMLtext.mcc                           HTMLtext.mcc/HTMLtext.mcc
  18.  
  19.    COPYRIGHT
  20.  
  21.      HTMLtext.mcc
  22.      (C)opyright by Dirk Holtwick, 1997
  23.  
  24.      This product is SHAREWARE and the source is available from
  25.      the author only if you are a registred user.
  26.  
  27.      The HTMLtext class may be used in every SHAREWARE project
  28.      without paying any fee. For comercial applications you need
  29.      a written permission of the author.
  30.  
  31.    DESCRIPTION
  32.      The HTMLtext class for MUI dispalys a subset of HTML in a virtual
  33.      group. You may put it into a ScrollgroupObject to move easier
  34.      through the text.
  35.  
  36.    AUTHOR
  37.      Dirk Holtwick
  38.      Grenzdicker Str. 13
  39.      D-47665 Sonsbeck
  40.      dirco@uni-duisburg.de
  41.      http://fsrinfo.uni-duisburg.de/~dirk/
  42.  
  43. HTMLtext.mcc/MUIA_HTMLtext_Block             HTMLtext.mcc/MUIA_HTMLtext_Block
  44.  
  45.    NAME
  46.      MUIA_HTMLtext_Block -- [..G], char *
  47.  
  48.    FUNCTION
  49.      Get a pointer to the marked text. The text will be stripped of any
  50.      HTML informations.
  51.  
  52.    EXAMPLE
  53.      moreHTML.c
  54.  
  55.    SEE ALSO
  56.      MUIA_HTMLtext_DoubleClick
  57.  
  58. HTMLtext.mcc/MUIA_HTMLtext_CloseURLHookTMLtext.mcc/MUIA_HTMLtext_CloseURLHook
  59.  
  60.    NAME
  61.      MUIA_HTMLtext_CloseURLHook -- [IS.], struct Hook *
  62.  
  63.    FUNCTION
  64.      This hook will be called, always when the local copy of an URL
  65.      is not longer needed. You may delete this file if you want,
  66.      otherwise it will never be deleted.
  67.  
  68.    EXAMPLE
  69.      moreHTML.c
  70.  
  71.    BUGS
  72.      This attribute doesn't work very well. It is better to avoid it,
  73.      until it works stabile in a later version.
  74.  
  75.    SEE ALSO
  76.      MUIA_HTMLtext_URL, MUIA_HTMLtext_OpenURLHook
  77.  
  78. HTMLtext.mcc/MUIA_HTMLtext_Contents       HTMLtext.mcc/MUIA_HTMLtext_Contents
  79.  
  80.    NAME
  81.      MUIA_HTMLtext_Contents -- (V1 ) [ISG], STRPTR
  82.  
  83.    FUNCTION
  84.      HTML text to be displayed in the HTMLtext object.
  85.  
  86.      This string may content HTML tags and the equivalent
  87.      closing tags (e.g. <b>..</b>. Not supported tags will not have any
  88.      effect to the output. The structure defined by the HTML specifications
  89.      have to be respected. See example for a simple HTML demo text.
  90.      To know about the supported tags and attributes please refer to
  91.      the documentation of the HTMLtext class.
  92.  
  93.      See also further documentations of the HTML language.
  94.  
  95.    EXAMPLE
  96.      MUIA_HTMLtext_Contents,
  97.         "<html>"
  98.         "  <head>"
  99.         "     <title>Example</title>"
  100.         "  </head>"
  101.         "  <body>"
  102.         "     <p>A simple example for the HTML class</p>"
  103.         "  </body>"
  104.         "</html>"
  105.  
  106.    BUG
  107.       If you set a text with background pattern in a not opened
  108.       window the background may appear crippled. (Don't ask me why!)
  109.  
  110.    SEE ALSO
  111.       MUIA_HTMLtext_URL, MUIA_HTMLtext_Path, MUIA_HTMLtext_Title
  112.  
  113. HTMLtext.mcc/MUIA_HTMLtext_DoubleClick HTMLtext.mcc/MUIA_HTMLtext_DoubleClick
  114.  
  115.    NAME
  116.      MUIA_HTMLtext_DoubleClick -- [..G], BOOL
  117.  
  118.    FUNCTION
  119.      This attribute is set to TRUE whenever the user
  120.      double clicks on an object in the text.
  121.  
  122.    SEE ALSO
  123.      MUIA_HTMLtext_Block
  124.  
  125. HTMLtext.mcc/MUIA_HTMLtext_ElementList HTMLtext.mcc/MUIA_HTMLtext_ElementList
  126.  
  127.    NAME
  128.      MUIA_HTMLtext_ElementList -- [..G], struct MUIS_HTMLtext_Element *
  129.  
  130.    FUNCTION
  131.      Gets a pointer to the first element of the list created by HTMLtext.mcc
  132.      to handle the text objects.
  133.  
  134.      The structure MUIS_HTMLtext_Element looks like this:
  135.  
  136.         struct MUIS_HTMLtext_Element
  137.         {
  138.            struct   MUIS_HTMLtext_Element *next;
  139.            UWORD    type;
  140.            UWORD    x,y,dx,dy;
  141.            Object   *obj;
  142.            char     *text;
  143.         };
  144.  
  145.      You can walk through the list by following 'next' until it is NULL.
  146.      'x','y' contain the eventually coords of the related MUI object
  147.      relatively to the upper left corner of the HTML object. 'dx' and 'dy'
  148.      contain the width and height of the object.
  149.      'type' can contain the various values of them only the followings
  150.      are public:
  151.  
  152.         MUIV_HTMLtext_Element_Text:
  153.            You may find a pointer to the text in 'text' and in 'obj'
  154.            a pointer to a MUI object of an internal custom class of
  155.            HTMLtext.mcc.
  156.  
  157.         MUIV_HTMLtext_Element_Image:
  158.            'obj' contains a pointer to the MUI object of an internal
  159.            custom class of HTMLtext.mcc.
  160.  
  161.         MUIV_HTMLtext_Element_HorizRule:
  162.            'obj' contains a pointer to the MUI object of 'Rectangle Class'.
  163.  
  164.      You may also use some macros defined in the include files. (See example)
  165.  
  166.    EXAMPLE
  167.      // Print active text of 'obj' (an HTMLtext object)
  168.  
  169.      struct MUIS_HTMLtext_Element *el;
  170.  
  171.      set(app, MUIA_Application_Sleep, TRUE);      // Better, to avoid confusi
  172. on
  173.      get(obj, MUIA_HTMLtext_ElementList, &el);
  174.      while(el)
  175.      {
  176.         printf("%s", MACRO_HTMLtext_GetText(el));
  177.         el = el->next;
  178.      }
  179.      set(app, MUIA_Application_Sleep, FALSE);
  180.  
  181. HTMLtext.mcc/MUIA_HTMLtext_LoadImages   HTMLtext.mcc/MUIA_HTMLtext_LoadImages
  182.  
  183.    NAME
  184.      MUIA_HTMLtext_LoadImages -- [IS.], BOOL
  185.  
  186.    FUNCTION
  187.      Override the users configuration reguarding the loading of images in
  188.      the HTML document. This may be usefull, if you use the HTMLtext.mcc
  189.      to display informations in which the image is a very important part.
  190.      In all other cases it might be better to let the user choose.
  191.  
  192.    EXAMPLE
  193.      moreHTML.c
  194.  
  195. HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook
  196.  
  197.    NAME
  198.      MUIA_HTMLtext_OpenURLHook -- [IS.], struct Hook *
  199.  
  200.    FUNCTION
  201.      This hook will be called, always when an URL has to be loaded
  202.      whose protocol is not supported. These URL's may come from
  203.      hyperlinks, images or else.
  204.      The hook function will receive a pointer to a structure described bellow
  205.      in the register a1. In a0 is a pointer to the calling hook and in a2
  206.      a pointer to the calling object.
  207.  
  208.         struct
  209.         {
  210.            char *URL;
  211.            char TmpFilename[1024];
  212.         };
  213.  
  214.      The member 'URL' contains the full name of the URL. 'TmpFilename' is an
  215.      array of char whereto the calleing hook copies the name of a local file
  216.      that contains the data coming from the URL. The default name already
  217.      standing in 'TmpFilename' will be a file in "T:". (Created by SAS/C
  218.      tmpnam() function).
  219.      However, you may change the name as you like.
  220.  
  221.      Returning TRUE from the Hook will mean, that the loading was successfull
  222.      and that a local copy will be found in 'Filename'. FALSE means that
  223.      something worked wrong and HTMLtext.mcc will output the ordinary error
  224.      message.
  225.  
  226.      FUTURE:
  227.  
  228.      For the future I plan to do file notification, that means that you may
  229.      launch a process to load data from the URL in a file. Then you leave the
  230.      function called by the Hook but returning TRUE and the name of the file.
  231.      Once the file is loaded comletely, HTMLtext.mcc will refresh the display
  232. .
  233.      Due to some technical problems it will take some time, before everything
  234.      works fine :(
  235.  
  236.      A MUIA_HTMLtext_CloseURLHook is also planed, so that you may stop the
  237.      launched process or delete the temporary file. This Hook will always be
  238.      called, when the URL to be displayed will change.
  239.  
  240.    EXAMPLE
  241.      moreHTML.c
  242.  
  243.    BUGS
  244.      This attribute doesn't work very well. It is better to avoid it,
  245.      until it works stabile in a later version.
  246.  
  247.    SEE ALSO
  248.      MUIA_HTMLtext_URL, MUIA_HTMLtext_CloseURLHook
  249.  
  250. HTMLtext.mcc/MUIA_HTMLtext_Path               HTMLtext.mcc/MUIA_HTMLtext_Path
  251.  
  252.    NAME
  253.      MUIA_HTMLtext_Path -- (V1 ) [ISG], STRPTR
  254.  
  255.    FUNCTION
  256.      Sets the path to the used document. This value will be used, if
  257.      there are images to load or links to follow and they not have
  258.      a full path. If you use MUIA_HTMLtext_LoadContents, the path will
  259.      be automatically set.
  260.  
  261.    SEE ALSO
  262.      MUIA_HTMLtext_URL
  263.  
  264. HTMLtext.mcc/MUIA_HTMLtext_Title             HTMLtext.mcc/MUIA_HTMLtext_Title
  265.  
  266.    NAME
  267.      MUIA_HTMLtext_Title -- (V1 ) [..G], STRPTR
  268.  
  269.    FUNCTION
  270.      Gets the title of the document currently active. The title has
  271.      to be specified in the text between <title> and </title> tags.
  272.  
  273.    SEE ALSO
  274.      MUIA_HTMLtext_Contents
  275.  
  276. HTMLtext.mcc/MUIA_HTMLtext_URL                 HTMLtext.mcc/MUIA_HTMLtext_URL
  277.  
  278.    NAME
  279.      MUIA_HTMLtext_URL -- [ISG], STRPTR
  280.  
  281.    FUNCTION
  282.      Name of an URL to be loaded. If the URL is of an not supported
  283.      protocol, the MUIA_HTMLtext_OpenURLHook will be called.
  284.  
  285.      The only supported protocol, yet, is "file://". Names without
  286.      any protocol specification will be handled as normal local filenames.
  287.  
  288.    SEE ALSO
  289.       MUIA_HTMLtext_OpenURLHook, MUIA_HTMLtext_Path, MUIA_HTMLtext_Title
  290.  
  291. HTMLtext.mcc/MUIM_HTMLtext_Jump               HTMLtext.mcc/MUIM_HTMLtext_Jump
  292.  
  293.    NAME
  294.      MUIM_HTMLtext_Jump
  295.  
  296.    SYNOPSIS
  297.      DoMethod(obj,MUIM_HTMLtext_Jump, struct MUIS_HTMLtext_Element *el);
  298.  
  299.    FUNCTION
  300.      Jump to position of an element to make it visible to the user.
  301.  
  302.    INPUTS
  303.      el   - The element to be jumped to
  304.  
  305.    RESULT
  306.      If for some resons it was impossible to jump, FALSE is returned.
  307.  
  308.    BUGS
  309.      Function may crash if element passed are not in element list.
  310.  
  311.    SEE ALSO
  312.      MUIA_HTMLtext_ElementList, MUIA_Virtgroup_Top
  313.  
  314. HTMLtext.mcc/MUIM_HTMLtext_Mark               HTMLtext.mcc/MUIM_HTMLtext_Mark
  315.  
  316.    NAME
  317.      MUIM_HTMLtext_Mark
  318.  
  319.    SYNOPSIS
  320.      DoMethod(obj,MUIM_HTMLtext_Mark,
  321.         struct MUIS_HTMLtext_Element *first,
  322.         struct MUIS_HTMLtext_Element *last);
  323.  
  324.    FUNCTION
  325.      Mark a part of the HTML text. Use list from MUIA_HTMLtext_ElementList
  326.  
  327.    INPUTS
  328.      first  - The first element to be marked
  329.      last   - The last  element to be marked
  330.  
  331.    RESULT
  332.      The result value is currently undefined.
  333.  
  334.    BUGS
  335.      Function may crash if element passed are not in element list.
  336.  
  337.    SEE ALSO
  338.      MUIA_HTMLtext_ElementList
  339.  
  340. HTMLtext.mcc/MUIM_HTMLtext_Reload           HTMLtext.mcc/MUIM_HTMLtext_Reload
  341.  
  342.    NAME
  343.      MUIM_HTMLtext_Reload
  344.  
  345.    SYNOPSIS
  346.      DoMethod(obj,MUIM_HTMLtext_Reload);
  347.  
  348.    FUNCTION
  349.      Reloads the current page. Use this, if you know that the documents
  350.      contents have changed, because MUIA_HTMLtext_URL will not reload
  351.      the document, if the URL given is the same as the one currently
  352.      displayed.
  353.  
  354.    SEE ALSO
  355.      MUIA_HTMLtext_URL
  356.  
  357.